//
//  GasViewController.h
//  FuelLog
//
//  Created by Pure Mass Communications on 9/1/08.
//  Copyright 2008 . All rights reserved.
//
//  Placed under GPL v2 with the kind permission of Pure Mass Communications
//
//  Modified to make compile under SDK 3.1 by Olaf Greck in May 2010
//
//
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; either version 2
//  of the License, or (at your option) any later version.

//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.

//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

#import <UIKit/UIKit.h>
#import "Gas.h"

@interface GasViewController : UIViewController <UIAlertViewDelegate> {
	Gas *gas;
	IBOutlet UINavigationItem * navItem;
//	IBOutlet UILabel *carLabel;
	IBOutlet GradientButton *dateButton;
	IBOutlet UITextField *odometerBox;
	IBOutlet UILabel *fuelLabel;
	IBOutlet UITextField *fuelBox;
	IBOutlet UILabel *dpfLabel;
	IBOutlet UILabel *dpfText;
	IBOutlet UITextField *costBox;
	IBOutlet UILabel *unitCostText;
	IBOutlet UISwitch *fullTankSwitch;
	IBOutlet UILabel *errorText;
	IBOutlet GradientButton *deleteButton;
	IBOutlet UILabel * versionLabel;
	
	NSDate *dateValue;
}

@property (nonatomic, retain) UINavigationItem * navItem;
@property (nonatomic, retain) GradientButton *dateButton;
@property (nonatomic, retain) UITextField *odometerBox;
@property (nonatomic, retain) UILabel *fuelLabel;
@property (nonatomic, retain) UITextField *fuelBox;
@property (nonatomic, retain) UITextField *costBox;
@property (nonatomic, retain) UILabel *unitCostText;
@property (nonatomic, retain) GradientButton *deleteButton;
@property (nonatomic, retain) UISwitch *fullTankSwitch;
@property (nonatomic, retain) UILabel *versionLabel ;



@property (nonatomic, retain) Gas *gas;
@property (nonatomic, retain) NSDate *dateValue;

- (void)updateDpf;
- (void)updateUnitCost;
- (void)setBoxes;

- (IBAction)editDate:(id)sender;
- (IBAction)odometerChanged:(id)sender;
- (IBAction)fuelChanged:(id)sender;
- (IBAction)costChanged:(id)sender;
- (IBAction)done:(id)sender;
- (IBAction)cancel:(id)sender;
- (IBAction)deleteEntry:(id)sender;

@end
